<extend name="Public:base"/>

<!--侧边导航-->
<block name="aside">
    <include file="Public:aside"/>
</block>

<block name="main">
    <if condition="$Think.session.admin.id eq 1">
    <div class="table-toolbar">
        <a class="btn btn-primary" href="{:U('Form/add')}">添加表单</a>
    </div>
    </if>

    <form name="myform" action="{:U('Form/listorder')}" method="post">
        <table class="table table-bordered table-hover table-condensed">
            <thead>
            <tr>
                <th width="40">ID</th>
                <th>表单名称</th>
                <th>数据库表名</th>
                <th>描述</th>
                <th class="manage w-300">操作管理</th>
            </tr>
            </thead>
            <tbody>
            <volist name="list" id="vo" key="k">
                <tr>
                    <td align="center">{$vo['id']}</td>
                    <td>{$vo['name']}</td>
                    <td>{$vo['tablename']}</td>
                    <td>{$vo['description']}</td>

                    <td class="manage">
                        <a class="btn btn-xs btn-primary" href="{:U('Form/content',array(formid=>$vo['id']))}">内容维护</a>
                        <?php if($_SESSION['admin']['role'] == 1):?>
                        <a class="btn btn-xs btn-primary" href="{:U('FormField/index',array(formid=>$vo['id']))}">表单字段</a>
                        <a class="btn btn-xs btn-primary" href="{:U('Form/edit',array(id=>$vo['id']))}">编辑</a>
                        <a class="btn btn-xs btn-danger" href="{:U('Form/delete',array(id=>$vo['id']))}"  onclick="return confirm('您确定要卸载吗？')">删除</a>
                        <?php endif;?>
                    </td>
                </tr>
            </volist>
            </tbody>
        </table>
    </form>


</block>